import React from "react";
import { connect } from "dva";
import styles from "./FixedBottomWrapper.less";

function FixedBottomWrapper(props) {
  const { children, coldata, footer, className = '' } = props;
  const { collapsed } = coldata;
  return (
    <div className={`${styles.root} ${className}`}>
      <div className={styles.content}>{children}</div>
      <div
        className={styles.footer}
        style={{
          // width: '100%',
          left: collapsed ? 64 : 200
        }}
      >
        {footer}
      </div>
    </div>
  );
}

export default connect(stores => ({
  coldata: stores.user
}))(FixedBottomWrapper);
